package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CaseDiscoveryTreatmentMapper;
import com.ruoyi.system.domain.CaseDiscoveryTreatment;
import com.ruoyi.system.service.ICaseDiscoveryTreatmentService;
import com.ruoyi.common.core.text.Convert;

/**
 * 病例发现与就诊信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-04-03
 */
@Service
public class CaseDiscoveryTreatmentServiceImpl implements ICaseDiscoveryTreatmentService 
{
    @Autowired
    private CaseDiscoveryTreatmentMapper caseDiscoveryTreatmentMapper;

    /**
     * 查询病例发现与就诊信息
     * 
     * @param id 病例发现与就诊信息主键
     * @return 病例发现与就诊信息
     */
    @Override
    public CaseDiscoveryTreatment selectCaseDiscoveryTreatmentById(Long id)
    {
        return caseDiscoveryTreatmentMapper.selectCaseDiscoveryTreatmentById(id);
    }

    /**
     * 查询病例发现与就诊信息列表
     * 
     * @param caseDiscoveryTreatment 病例发现与就诊信息
     * @return 病例发现与就诊信息
     */
    @Override
    public List<CaseDiscoveryTreatment> selectCaseDiscoveryTreatmentList(CaseDiscoveryTreatment caseDiscoveryTreatment)
    {
        return caseDiscoveryTreatmentMapper.selectCaseDiscoveryTreatmentList(caseDiscoveryTreatment);
    }

    /**
     * 新增病例发现与就诊信息
     * 
     * @param caseDiscoveryTreatment 病例发现与就诊信息
     * @return 结果
     */
    @Override
    public int insertCaseDiscoveryTreatment(CaseDiscoveryTreatment caseDiscoveryTreatment)
    {
        return caseDiscoveryTreatmentMapper.insertCaseDiscoveryTreatment(caseDiscoveryTreatment);
    }

    /**
     * 修改病例发现与就诊信息
     * 
     * @param caseDiscoveryTreatment 病例发现与就诊信息
     * @return 结果
     */
    @Override
    public int updateCaseDiscoveryTreatment(CaseDiscoveryTreatment caseDiscoveryTreatment)
    {
        return caseDiscoveryTreatmentMapper.updateCaseDiscoveryTreatment(caseDiscoveryTreatment);
    }

    /**
     * 批量删除病例发现与就诊信息
     * 
     * @param ids 需要删除的病例发现与就诊信息主键
     * @return 结果
     */
    @Override
    public int deleteCaseDiscoveryTreatmentByIds(String ids)
    {
        return caseDiscoveryTreatmentMapper.deleteCaseDiscoveryTreatmentByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除病例发现与就诊信息信息
     * 
     * @param id 病例发现与就诊信息主键
     * @return 结果
     */
    @Override
    public int deleteCaseDiscoveryTreatmentById(Long id)
    {
        return caseDiscoveryTreatmentMapper.deleteCaseDiscoveryTreatmentById(id);
    }
}
